// components/navbar/index.js
const App = getApp();

Component({
  options: {
    addGlobalClass: true,
  },
  /**
   * 组件的属性列表
   */
  properties: {
    back: {
      type: Boolean,
      value: ''
      },
      position: {
        type: Number,
        value: '1'
        },
    pageName:String
  },

  /**
   * 组件的初始数据
   */
  data: {
   navTop:App.globalData.menuButton.top,
   navHeight: App.globalData.systemInfo.statusBarHeight + App.globalData.menuButton.height
  },
  onLoad() {
    console.log(8888888)
    console.log(App.globalData.menuButton.top)
    this.setData({
      navTop:App.globalData.menuButton.menuButtonObject.top
    })
  },
  // lifetimes: {
  //   attached: function () {
  //     this.setData({
  //       navH: App.globalData.statusBarHeight + App.globalData.menuButton.height + (App.globalData.menuButton.top - App.globalData.statusBarHeight)*2
  //     })
  //    }
  // },
  /**
   * 组件的方法列表
   */
  methods: {
    back(){
      wx.navigateBack({
        delta: 1,
      })
    }
  }
})